<template>
  <div>
    <input
      placeholder="输入关键字搜索"
      v-model.trim="numValue"
      @blur="search"
    />
    <DetaAls 
    :listData='list'>
    </DetaAls>
  </div>
</template>
<script>
import DetaAls from "./componer/DetaAls.vue";
export default {
  components: {
    DetaAls,
  },

  data() {
    return {
      numValue: "",
      flags: false,
      list: [
        {
          time: "2022-01-01",
          uname: "张三",
          result: "感冒",
          info: "感冒药",
          operation: "详情",
        },
        {
          time: "2022-02-01",
          uname: "李四",
          result: "新冠",
          info: "抗原试剂",
          operation: "详情",
        },
         {
          time: "2022-03-01",
          uname: "雪",
          result: "口齿不清",
          info: "相声散",
          operation: "详情",
        },
        {
          time: "2022-04-01",
          uname: "王五",
          result: "肚子疼",
          info: "泻药",
          operation: "详情",
        },
      ],
    };
  },
  methods: {
    search() {
      this.list = this.list.filter((item) => item.uname === this.numValue);
    },
  
  },
};
</script >

<style>
.my-table {
  border-collapse: collapse;
  width: 100%;
}

.my-table td,
.my-table th {
  border: 1px solid #ddd;
  padding: 8px;
  text-align: left;
}

.my-table th {
  background-color: #f2f2f2;
}
</style>